﻿using System.Collections.Generic;
using System.ServiceModel;
using Pku.BookStore.Model;

namespace Pku.BookStore.IServices
{
    [ServiceContract(Name = "IEmployeeServices", Namespace = "Pku.BookStore.IServices")]
    public interface IEmployeeServices
    {
        /// <summary>
        /// 增加员工信息
        /// </summary>
        /// <param name="entity"></param>
        [OperationContract(Name = "Add")]
        int Add(EmployeeModel entity);

        /// <summary>
        /// 修改员工信息
        /// </summary>
        /// <param name="entity"></param>
        [OperationContract(Name = "Modify")]
        bool Modify(EmployeeModel entity);

        /// <summary>
        /// 搜索
        /// </summary>
        /// <returns></returns>
        [OperationContract(Name = "Search")]
        List<EmployeeModel> Search(EmployeeParam param);

        /// <summary>
        /// 获取员工实体
        /// </summary>
        /// <param name="employeeID"></param>
        /// <returns></returns>
        [OperationContract(Name = "GetEntityById")]
        EmployeeModel GetEntityById(int employeeID);

        /// <summary>
        /// 是否存在
        /// </summary>
        /// <param name="Str">关键字</param>
        /// <returns></returns>
        [OperationContract(Name = "Exist")]
        bool Exist(string Str);

        /// <summary>
        /// 修改最后登录信息
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        [OperationContract(Name = "ModifyLast")]
        bool ModifyLast(EmployeeModel entity);

        /// <summary>
        /// 修改员工密码
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        [OperationContract(Name = "ModifyPass")]
        bool ModifyPass(EmployeeModel entity);

        /// <summary>
        /// 用户登录
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        [OperationContract(Name = "Login")]
        EmployeeModel Login(EmployeeModel entity);

    }
}
